#ifndef __SQLITE3_INTERFACE_H_INCLUDED__
#define __SQLITE3_INTERFACE_H_INCLUDED__

#include <sqlite3.h>

sqlite3 * db_connection_open(const char * name);
int       db_connection_close(sqlite3 * db);

int db_table_create(sqlite3 * db);

int db_entry_find(sqlite3 * db, const char * str, size_t line);
int db_entry_insert(sqlite3 * db, const char * str, size_t line);
int db_entry_update(sqlite3 * db, int id);

int  db_new_entries_count(sqlite3 * db);
void db_new_entries_send(sqlite3 * db);

#define NEW_ENTRIES_SECONDS 60
#define NEW_ENTRIES_AMOUNT 500

#endif
